#include "common.h"

void clear_screen()
{
#if _MSC_VER
    system("cls");
#else
    system("clear");
#endif
}

void showMainMenu()
{
    clear_screen();

    std::cout << "--------------------------------------" << std::endl;
    std::cout << "|========== 欢迎使用小谷记账簿 ==========" << std::endl;
    std::cout << "--------------------------------------" << std::endl;
    std::cout << "**********    1 记账    ***************" << std::endl;
    std::cout << "**********    2 查询    ***************" << std::endl;
    std::cout << "**********    3 退出    ***************" << std::endl;

    std::cout << "\n请选择(1-3): ";
}

void showAccountingMenu()
{
    clear_screen();

    std::cout << "--------------------------------------" << std::endl;
    std::cout << "|==========    选择记账种类   ==========" << std::endl;
    std::cout << "--------------------------------------" << std::endl;
    std::cout << "**********    1 收入       ************" << std::endl;
    std::cout << "**********    2 支出       ************" << std::endl;
    std::cout << "**********    3 返回主菜单  ************" << std::endl;

    std::cout << "\n请选择(1-3): ";
}

void showQueryMenu()
{
    clear_screen();

    std::cout << "--------------------------------------" << std::endl;
    std::cout << "|==========  选择查询条件     ==========" << std::endl;
    std::cout << "--------------------------------------" << std::endl;
    std::cout << "**********    1 统计所有账目  **********" << std::endl;
    std::cout << "**********    2 统计收入     ***********" << std::endl;
    std::cout << "**********    3 统计支出     ***********" << std::endl;
    std::cout << "**********    4 返回主菜单   ***********" << std::endl;

    std::cout << "\n请选择(1-4): ";
}